package com.aos.erp.manager.remote;

import com.aos.erp.common.exception.BizException;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(name = "${erp-school-server}", url = "${erp-school-server-url}")
public interface DepartmentService {

    /**
     * 新增部门---总校
     * @param divisionCode
     * @param schoolCode
     * @param name
     * @throws BizException
     */
    @PostMapping(value = "/service/department/addDepSchool")
    void addBeanSchool(String divisionCode, String schoolCode, String name) throws BizException;
/*
    *//**
     * 新增部门---分校/报名点
     * @param parentSchoolCode  父级驾校组织code
     * @param schoolCode        驾校组织code
     * @param name              驾校/报名点名称
     * @param depType           部门类型[F:分校;B:报名点]
     * @throws BizException
     */
    @PostMapping(value = "/service/department/addDepBranch")
    void addBeanSchoolBranch(String parentSchoolCode,String schoolCode, String name,String depType) throws BizException;

    /**
     * "获取分所组织code
     * @param code  分所代码
     * @return
     * @throws BizException
     */
    @PostMapping(value = "/service/department/getDepCodeDivision")
    String getDepCodeDivision(String code) throws BizException;

    /**
     * 获取总校组织code
     * @param divisionCode  分所组织code
     * @return
     */
    @PostMapping(value = "/service/department/getDepCodeSchool")
    String getDepCodeSchool(String divisionCode) throws BizException;

    /**
     * 获取分校/报名点组织code
     * @param schoolCode    总校组织code、分校组织code
     * @param depType       部门类型[F:分校;B:报名点]
     * @return
     * @throws Exception
     */
    @PostMapping(value = "/service/department/getDepCodeBranch")
    String  getDepCodeBranch(String schoolCode, String depType) throws BizException;

}
